package cn.yi.newsys.pojo;

import java.util.ArrayList;
import java.util.List;

public class PageBean<T> {
	private int currPageNo = 1 ;		// 当前页码
	private int pageSize = 10 ;			// 每页显示的记录数
	private int totalCount ;			// 总记录数
	private int totalPageCount ;		// 总页数
	private List<T> lisr = new ArrayList<T>() ;		// 每页的数据
	
	
	public int getCurrPageNo() {
		return currPageNo;
	}
	public void setCurrPageNo(int currPageNo) {
		this.currPageNo = currPageNo;
	}
	public int getPageSize() {
		return pageSize;
	}
	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}
	public int getTotalCount() {
		return totalCount;
	}
	public void setTotalCount(int totalCount) {
		if(totalCount > 0){
			this.totalCount = totalCount ;
			int temp = this.totalCount / this.pageSize ;
			this.totalPageCount = this.totalCount%this.pageSize==0?temp:temp+1 ;
		}
	}
	public int getTotalPageCount() {
		return totalPageCount;
	}
	public List<T> getLisr() {
		return lisr;
	}
	public void setLisr(List<T> lisr) {
		this.lisr = lisr;
	}
	
}
